package org.example.l0;

public class pivot {
    public int findMin(int[] nums) {
        int len = nums.length, low = 0, high = len - 1;
        int pivot = 0;
        while (low < high) {
            pivot = (low + high) >> 1;
            int v = nums[pivot];
            if (v < nums[high]) {
                high = pivot - 1;
            } else {
                low = pivot + 1;
            }
        }

        return nums[low];
    }
}
